﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace tinh_giai_thua
{
    class TinhGiaiThua
    {
        int N;
        public int Nhap()
        {
                N = Convert.ToInt16(Console.ReadLine());
               while (N >8 || N<=0)
                {
                
                    Console.WriteLine("nhap lai so <8");
                    N = Convert.ToInt16(Console.ReadLine());
                }
               return N;
            
        }

        public int giaithua(int B)
        {
            int KQ=1;
            for (int i = 1; i <= B; i++)
            {
                KQ = KQ * i;
 
            }
            return KQ;
        }
    }
}
